package com.cmc.cloud.cmclink.doc.vo.specialcargocntrvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
import java.util.List;

/**
 * 特种货审批的箱型信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SpecialCargoCntrBaseVO {

    @Schema(description = "主信息下cntrId,更新需要传")
    private Long id;

    @Schema(description = "特种货申请主id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2805")
    private Long applyId;

    @Schema(description = "箱型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{SpecialCargoCntrBaseVO.cntrType.notBlank}")
    @Length(max = 2, message = "{SpecialCargoCntrBaseVO.cntrType.length}")
    private String cntrType;

    @Schema(description = "箱尺寸", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoCntrBaseVO.cntrSize.notBlank}")
    @Length(max = 2, message = "{SpecialCargoCntrBaseVO.cntrSize.length}")
    private String cntrSize;

    @Schema(description = "箱量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoCntrBaseVO.qty.notNull}")
    private Integer qty;

    @Schema(description = "货物毛重（Kg）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoCntrBaseVO.grossWgt.notNull}")
    @Positive(message = "{SpecialCargoCntrBaseVO.grossWgt.positive}")
    private BigDecimal grossWgt;

    @Schema(description = "货物净重 （Kg）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoCntrBaseVO.netWgt.notNull}")
    @Positive(message = "{SpecialCargoCntrBaseVO.netWgt.positive}")
    private BigDecimal netWgt;

    @Schema(description = "关联的DG")
    private List<Long> dgId;

    @Schema(description = "关联的DG的unNo")
    private List<String> unNo;

    @Schema(description = "箱子下挂的DG临时标识，和DG信息里一一对应")
    private List<Long> dgLabels;

    @Schema(description = "关联的DG的imoClass")
    private List<String> imoClass;

}
